﻿using System;
using System.Collections.Generic;
using System.Web.Http;
using Smatime.Web.DAO;
using Smatime.Web.Models;

namespace Smatime.Web.Controllers
{
    public class TotalWorkOfStaffController : ApiController
    {
        // GET api/totalworkofstaff
        [Route("api/totalworkofstaff/companystaffid/{id}/month/{month}")]
        public IEnumerable<TotalWorkOfStaff> GetTotalWork(long id, DateTime month)
        {
            return new TotalWorkOfStaffRepository().GetTotalWorkBy(id, month);
        }
        // GET api/totalworkofstaff
        [Route("api/totalworkofstaff/companyId/{companyId}/stampdate/{stampdate}/storeName/{storeName}")]
        public IEnumerable<TotalWorkOfStaff> GetTotalWork(long companyId, DateTime stampdate, string storeName)
        {
            return new TotalWorkOfStaffRepository().GetByStampDate(companyId, stampdate, storeName);
        }

        // GET api/totalworkofstaff/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/totalworkofstaff
        public void Post([FromBody]string value)
        {
        }

        // PUT api/totalworkofstaff/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/totalworkofstaff/5
        public void Delete(int id)
        {
        }
    }
}